﻿<UserControl x:Class="EFS.RC.Wallboard.Controls.Common.Charts.Bars.SingleBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
			 LayoutUpdated="UserControl_LayoutUpdated" Background="Transparent">

	<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
		<Grid.RowDefinitions>
			<RowDefinition Height="*"></RowDefinition>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"></ColumnDefinition>
		</Grid.ColumnDefinitions>
		<DockPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0">
			
			<!-- simulates the bar size -->
			<Grid Name="gridBarEmpty" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DockPanel.Dock="Top" Margin="0,0,0,0"></Grid>
			
			<!-- Title & Value  -->
			<Grid Name="gridTitleValue"  VerticalAlignment="Stretch" HorizontalAlignment="Center" DockPanel.Dock="Top">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"></RowDefinition>
					<RowDefinition Height="Auto"></RowDefinition>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"></ColumnDefinition>
				</Grid.ColumnDefinitions>
				<TextBlock Grid.Row="0" Grid.Column="0" TextAlignment="Center" HorizontalAlignment="Stretch" Margin="0" TextWrapping="Wrap" Text="Bar Title" VerticalAlignment="Bottom" Foreground="Black" FontWeight="Bold" Name="textBlockTitle" />
				<TextBlock Grid.Row="1" Grid.Column="0" TextAlignment="Center" HorizontalAlignment="Stretch" Margin="0" TextWrapping="NoWrap" Text="0" VerticalAlignment="Bottom" Foreground="Black" FontWeight="Bold" Name="textBlockValueTop" />
			</Grid>
			
			<!-- The actual bar -->
			<UniformGrid Name="uniformGridFill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DockPanel.Dock="Top" Height="150">
				<Border Margin="0"  Name="borderFill" BorderThickness="0" BorderBrush="Red" Background="Red" CornerRadius="5,5,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
					<TextBlock Margin="0" TextAlignment="Center" HorizontalAlignment="Stretch" TextWrapping="NoWrap" Text="0" VerticalAlignment="Top" Foreground="White" FontWeight="Bold" Name="textBlockValueBottom" />
				</Border>
			</UniformGrid>
		</DockPanel>
	</Grid>
</UserControl>